home *** CD-ROM | disk | FTP | other *** search
- DISPLAY OFF
- ˇ
- ˇW A R N I N G:
- ˇ========================================
- ˇPlease don't alter this file.
-
- ˇAlso, don't copy statements from this file for programming your own
- ˇcommand files. Special characters have been embedded which may cause
- ˇerratic behavior in your command files.
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
-
-
-
-
-
-
-
-
-
-
-
-
- ˇ Welcome to the XA demo!
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ This quick tour will highlight many of the features of XA. To get
- ˇ the most power from XA, please read the User's Guide (XA_203.TXT).
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Features of XA Version 2.3
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ * Sends DIRECT (immediate) and EVENT (scheduled) X10 commands via
- ˇ DOS prompt, batch file, or command file.
- ˇ * User configurable - Works with any COM port (interrupt or polled mode).
- ˇ * Automatic and complete CP-290 schedule maintenance.
- ˇ * Sunrise and Sunset calculations, automatic DST adjustments.
- ˇ * Synchronization of the CP-290 or PC onboard clocks.
- ˇ * Program an event to occur any DATE in the future.
- ˇ * Repeat events every 'n' days.
- ˇ * PowerFail Recovery, restores modules to programmed state.
- ˇ * Interface to external conditions via I/O ports.
- ˇ * Monitoring and logging CP-290 activity.
- ˇ * Powerful programming language (IF/ELSE, variables, logic operations,
- ˇ GOTO, GOSUB/RETURN, INPORT/OUTPORT)
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ XA is copyrighted 1991-1994 by Bruce Christensen. All Rights Reserved.
- pause
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
-
-
-
-
-
-
-
-
-
- ˇ What is XA?
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ XA is a command interpreter for the CP-290, X10's Computer Interface.
- ˇ The XA interpreter translates English-like sentences into commands that
- ˇ are understood by the CP-290. XA parses commands from a variety of inputs.
- ˇ XA can read commands from the DOS prompt. The following example turns
- ˇ on an X10 module whose address is set at House A Unit 9:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA "A9 ON"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ You can embed X10 commands within batch files too:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
-
- ˇ PHONE.BAT:
- ˇ XA "A9 ON"
- ˇ CALL PRODIGY
- ˇ XA "A9 OFF"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ X10 commands entered from the DOS prompt or batch file must be enclosed in
- ˇ "quotation marks". Multiple X10 commands may be entered, they must be
- ˇ separated by "quotations" too.
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA "A9 ON" "A10 OFF" "C3 DIM 50"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- pause
-
-
-
-
-
-
-
-
- ˇ
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Command Files
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ
- ˇ Another input for X10 statements is the command file (*.CMD). This file
- ˇ can hold an unlimited number of commands that are executed sequentially
- ˇ by XA. For instance, you can create a "script" of X10 commands to control
- ˇ Christmas lights. You tell XA which file to read as follows:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA F=XMAS.CMD
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ
- ˇ where XMAS.CMD contains the following commands:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ A1 DIM
- DISPLAY OFF DELAY 0:0:1 DISPLAY ON
- ˇ A2 BRIGHT
- DISPLAY OFF DELAY 0:0:1 DISPLAY ON
- ˇ A3 OFF
- DISPLAY OFF DELAY 0:0:1 DISPLAY ON
- ˇ A4 ON
- DISPLAY OFF DELAY 0:0:1 DISPLAY ON
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA offers many special commands that allow you to create very sophisticated
- ˇ script files. Some of these commands include:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ IF/ELSE/ENDIF, GOTO, GOSUB/RETURN,
- ˇ PAUSE, DELAY secs, TIMER secs, ...plus many others.
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ See the User's Manual for complete details.
- pause
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Event Scheduling
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
-
-
-
- ˇ While XA is great for sending immediate commands to your CP-290, XA really
- ˇ excels at scheduling and maintaining events. Events are X10 commands stored
- ˇ in the CP-290's memory and activated at some future time. As with direct
- ˇ commands, events may be programmed from the DOS prompt:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA "A9 ON TIME 8:00 PM WEEKDAYS"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Event statements are usually stored in command files. A command file may
- ˇ contain your entire X10 event schedule. You can have XA download your
- ˇ complete schedule for you automatically. If you control your personal
- ˇ computer with an X10 Appliance Module, then you can have XA perform
- ˇ automatic event downloads on a weekly basis. See the section entitled
- ˇ "POWERUP Utility" in the User's Guide for complete details.
-
-
- pause
-
-
-
-
-
-
-
-
-
-
-
-
- ˇThe following is an example of an X10 event file called XA.CMD:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA F=XA.CMD
-
- ˇ :
- ˇ PORCH_LIGHTS ON SUNSET EVERYDAY
- ˇ PORCH_LIGHTS OFF SUNRISE EVERYDAY
- ˇ DECK_LIGHTS ON DUSK DATE 5/1 THRU 9/30 WEEKDAYS
- ˇ :
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ Notice how more descriptive names may be substituted for module
- ˇ house and unit codes. PORCH_LIGHTS have been "DEFINED" (or substituted)
- ˇ for the module address House A Unit 9.
-
- ˇ XA supports dynamic instances such as sunrise and sunset. These times
- ˇ are calculated based on your latitude and longitude.
-
- ˇ XA is also capable of evaluating dates and storing an event when the
- ˇ statement meets the proper criteria. XA allows you to program an event
- ˇ weeks, months, or years into the future.
-
-
- pause
-
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Configurable Communications
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
-
- ˇ XA supports COM1 through COM4 using either interrupt-driven (preferred mode)
- ˇ or polled communications. A utility program called FINDX10 is included which
- ˇ will analyze your installed COM ports and search for the CP-290.
-
- ˇ IMPORTANT NOTE: FINDX10 only works in a true DOS environment.
- ˇ FINDX10 may not be able to locate the CP-290 if you are
- ˇ running WINDOWS.
-
-
-
-
-
-
- ˇ
- ˇ To run FINDX10...
-
- pause
-
-
-
-
-
- DOS FINDX10 !
- ˇ
- ˇ If the last message reads:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ "Found CP-290 at COMx. Use IO xxx IRQ xxx"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ then you're in luck. XA should work on your PC without any problems.
- ˇ Note: You will be instructed to run FINDX10 later to setup XA's
- ˇ initialization file (XA.INI).
- ˇ
- ˇ If the last message reads:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ "Can not locate the CP-290..."
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ you may have problems running XA. Later on, try connecting the CP-290
- ˇ to a different COM port and then run FINDX10 again. If you are running
- ˇ Windows, you will need to exit Windows (press ALT-F4), then run
- ˇ FINDX10 again.
- pause
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
-
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Initialization File (XA.INI)
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ In addition to using command files, XA also reads a file called XA.INI. This
- ˇ is an initialization file where you store XA statements that describe the
- ˇ setup of your machine. For instance, the IO and IRQ tokens that FINDX10
- ˇ suggested to you should be placed in this file. Here is a sample of other
- ˇ XA tokens that would normally appear in XA.INI:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ DEFINE PORCH_LIGHTS HOUSE A UNIT 9
- ˇ DEFINE DECK_LIGHTS HOUSE A UNIT 1
-
- ˇ LATITUDE 41¯35' # Coordinates of
- ˇ LONGITUDE 81¯20' # Mentor, Ohio
- ˇ TIMEZONE 5 DST # used for Sunrise/sunset calcs
-
- ˇ COM3 # For "standard" COM configurations
- ˇ IO 3E8H # For "special"...
- ˇ IRQ 5 # ... COM configurations
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- ˇ A sample XA.INI is included with this software. You can modify it to suit
- ˇ your configuration. Also, the User's Guide contains complete information
- ˇ about "tokens" and the initialization file. Please read it!
- pause
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Powerfail Recovery
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA can be used to restore all CP-290 controlled modules back to their
- ˇ programmed state in the event of a power failure, or other circumstance.
- ˇ The proper state is determined by examining the CP-290's event schedule.
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA -p
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Powerfail Recovery. Checking status...
- DISPLAY OFF VIDEO6 YELLOW BLUE DELAY 0:0:1 DISPLAY ON
- ˇ Restoring: PORCH_LIGHTS ON
- ˇ Restoring: DECK_LIGHTS OFF
- ˇ Ignoring : DEHUMIDIFIER
- ˇ Forcing : HALL_LIGHTS ON
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA allows selected modules (DEHUMIDIFIER) to be excluded from recovery,
- ˇ others (HALL_LIGHTS) can forced to a particular state no matter what XA
- ˇ determines.
-
-
- pause
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Special DATE handling
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Events can be programmed to occur on specific dates or between a range of
- ˇ dates. Events can also be excluded from occuring on specific (or range of)
- ˇ dates. The following examples show how you can control lighting during
- ˇ specific dates.
-
- ˇ Turn on flagpole light on July 4:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ FLAGPOLE ON SUNSET DATE 7/4
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Turn on flagpole on multiple holidays:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ FLAGPOLE ON SUNSET DATE 5/31 DATE 7/4 DATE 9/6
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Turn on porch lights only during the winter season:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ PORCH_LIGHTS ON TIME 5:30 DATE 11/1/93 THRU 3/31/94 WEEKDAYS
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Turn on porch lights EXCEPT during certain holidays:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ PORCH_LIGHTS ON TIME SUNSET EXCEPT DATE 5/31 DATE 7/4 DATE 9/6 WEEKDAYS
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ Turn on deck lights during summer EXCEPT during vacation:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ DECK_LIGHTS ON TIME SUNSET DATE 4/1 THRU 9/30 EXCEPT DATE 7/1 THRU 7/14
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Report Generation
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA can produce report files (XA.RPT) of your X10 schedule in (2) special
- ˇ formats. The first style lists events sorted by day and time:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ Saturday - January 01, 1994 Sunrise: 7:52:05 Sunset: 5:05:09
-
- ˇ Time Cmd Mode Module Address/Description Event
- ˇ -------- --- -------- ---------------------------------- ------
- ˇ 12:30 am OFF (A8) LIVING_ROOM_LAMP ( 41)
- ˇ 12:30 am OFF (A4) FAMILY_ROOM_LAMP ( 43)
- ˇ 1:30 am OFF (A3) BEDROOM_LIGHT ( 54)
- ˇ 6:00 am ON (B2) DEHUMIDIFIER ( 56)*
- ˇ 7:22 am OFF (H1) STAIRS ( 63)*
- ˇ 7:22 am OFF (H2) HALLWAY ( 63)*
- ˇ 12:00 pm OFF (B2) DEHUMIDIFIER ( 57)*
- ˇ 4:05 pm ON (A4) FAMILY_ROOM_LAMP ( 51)
- ˇ 4:56 pm ON (B2) DEHUMIDIFIER ( 58)*
- ˇ 5:05 pm DIM (A6) OUTSIDE_PORCH_LIGHTS ( 48)
- ˇ 5:06 pm DIM (H1) STAIRS ( 61)*
- ˇ 5:06 pm DIM (H2) HALLWAY ( 60)*
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
- ˇ The second style lists events sorted by day, module, and time:
-
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ Saturday - January 01, 1994 Sunrise: 7:52:05 Sunset: 5:05:09
-
- ˇ Module Time Function Mode Event
- ˇ ---------------------------------------------------------------------------
-
- ˇ (A3) BEDROOM_LIGHT
- ˇ 1:30 am OFF ( 54)
- ˇ 10:34 pm ON ( 53)
-
- ˇ (A4) FAMILY_ROOM_LAMP
- ˇ 12:30 am OFF ( 43)
- ˇ 4:05 pm ON ( 51)
-
- ˇ (A6) OUTSIDE_PORCH_LIGHTS
- ˇ 5:05 pm DIM ( 48)
- ˇ 5:22 pm DIM ( 70)
- ˇ 10:40 pm OFF ( 55)
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Clock Synchronization
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA can keep the internal clocks of your PC and CP-290 accurate to within
- ˇ 1 second of each other. You can set either clock based on the time
- ˇ maintained by the other clock.
-
- ˇ If your PC does not have on-board clock, you can set its time based on the
- ˇ time maintained by the CP-290. Simply put the following statement in your
- ˇ AUTOEXEC.BAT file:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ XA "SYNCHRONIZE PC"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ To get both clocks accurate to within 1 second:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
-
- ˇ XA "SYNCHRONIZE PC EXACT"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ You can also set the CP-290 based on your PC's internal clock.
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ XA "SYNCHRONIZE X10"
- ˇ XA "SYNCHRONIZE X10 EXACT"
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Monitoring and Logging CP-290 Activity
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA can monitor all activity reported by the CP-290. For instance, when
- ˇ the CP-290 triggers an scheduled event, or when one of the buttons on
- ˇ the CP-290 console is pressed, XA captures the action and displays the
- ˇ activity on your screen. XA can also log this information in a file
- ˇ if requested:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ C:\> XA "MONITOR"
-
- ˇ Monitor events. Press <ESC> when finished...
-
- ˇ Sat Jan 01 2:16:02 1994 (D1...D16) ALL UNITS OFF
- ˇ Sat Jan 01 3:00:02 1994 (C1) COMPUTER ON
- ˇ Sat Jan 01 16:02:02 1994 (A4) FAMILY_ROOM_LAMP ON
- ˇ Sat Jan 01 16:02:05 1994 (A8) LIVING_ROOM_LAMP ON
- ˇ Sat Jan 01 17:16:02 1994 (A9) PORCH ON
- ˇ Sat Jan 01 18:00:02 1994 (C8) KATHRYNS_PC OFF
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Powerup Utility
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ A utility program called POWERUP.EXE is supplied with XA which assists
- ˇ you in performing unattended, automatic, event downloads to the CP-290.
- ˇ As long as your PC is controlled by an Appliance Module, you can have
- ˇ the CP-290 boot your computer at some predetermined time (for instance,
- ˇ Sunday mornings @ 3:00 am). Your AUTOEXEC.BAT file can call POWERUP which
- ˇ determines if its the proper time to perform a schedule update.
-
- ˇ Here are the statements required in AUTOEXEC.BAT to perform automatic
- ˇ schedule updates:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ :
- ˇ POWERUP d=SUN s=2:55 e=3:05
- ˇ if not errorlevel 1 goto skip
- ˇ XA f=XA.CMD
- ˇ XA "PC OFF"
- ˇ :skip
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Registration Benefits
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ When you register your copy of XA, you will be sent a floppy disk which
- ˇ enables the following items:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
-
- ˇ * IF / ELSE / ENDIF Statements
- ˇ * Logical, Boolean, and Arithmetic operators
- ˇ * Pre-defined variables (CDAY, CDATE, and CTIME)
- ˇ * Interaction with I/O ports (ex. joystick) to send X10 commands.
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ These additions allow you to write specialized script and event files.
- ˇ The next few screens will give you some ideas.
-
-
-
- pause
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
-
-
-
-
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLACK DISPLAY ON
- ˇ IF / ELSE / ENDIF
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
-
- ˇ These constructs allow you to alter the flow of execution within your
- ˇ event command file or script file based on conditions you program.
- ˇ In addition, XA allows you to customize the color of the conditional
- ˇ statements so you can easily tell how the statement was evaluated.
- ˇ For instance, assuming today is Sunday, you can have XA test the CDAY
- ˇ variable and if it's the WEEKEND have XA parse a special WEEKEND
- ˇ event file. Note that the IF test is TRUE so it is displayed in
- ˇ GREEN colors, the ELSE is FALSE, so it is displayed in RED:
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
-
-
- DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
- ˇ IF ((CDAY == SAT) OR (CDAY == SUN))
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
- ˇ XACMD WEEKEND.CMD
- DISPLAY OFF VIDEO6 RED BLACK DISPLAY ON
- ˇ ELSE
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
- ˇ XACMD WEEKDAY.CMD
- DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
- ˇ ENDIF
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
-
-
-
- pause
-
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Input and Output from a Port
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ XA allows you to use your joystick port, LPT port, or any other port
- ˇ as a general purpose Input/Output port. Connect switches and/or
- ˇ relays to these ports and program XA to react to real-world events.
- ˇ The following code appears in the included file JOYSTICK.CMD:
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
-
- ˇ :LOOP # This is the beginning of the loop
- ˇ GAME = INPORT 201H # Read the joystick port
- ˇ IF !(GAME & 20H) # Check Button A
- ˇ IF (MODULE == OFF) # If module is currently Off...
- ˇ c2 on fast # ...Turn module C2 On
- ˇ MODULE = ON # ...update status of module to On
- ˇ ENDIF
- ˇ ENDIF
-
- ˇ IF !(GAME & 10H) # Check Button B
- ˇ IF (MODULE == ON) # If module is currently On...
- ˇ c2 off fast # ...Turn module C2 Off
- ˇ MODULE = OFF # ...update its status too
- ˇ ENDIF
- ˇ ENDIF
- ˇ GOTO LOOP # Loop until <ESC> pressed.
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
- pause
-
-
-
-
-
-
- DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
- ˇ Now it's your turn
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- ˇ This is just a sample of what XA can do with your CP-290. Please take
- ˇ the time to read the accompanying User's Guide to learn all of XA's
- ˇ capabilities.
-
- ˇ XA is SHAREWARE. If you continue to use XA beyond the 45 trial period,
- ˇ you need to register this package with the author. Registration brings
- ˇ additional benefits including very powerful programming constructs, and
- ˇ a printed User's Guide.
-
- ˇ Thank you for trying XA! Send any correspondence to:
-
- DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
- ˇ Bruce Christensen CompuServe : 73201,1531
- ˇ 6594 Hudson Ave. Prodigy : MHNC39A
- ˇ Mentor, OH. 44060-4545 America OnLine: AuggieBen
-
- DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
-
- pause
-